<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* php-ats admin 
* @author Mav Peri
*/

class endpoint extends CI_Controller {
		public function index()
	{
		echo "nothing here";
	}
	
	/**
	* saves a php-ats feed 
	*/
	function save(){		
		$settings = parse_ini_file('/etc/php-ats.ini', true);
		//you may need to use RAW_POST_DATA if your php installation is older.
		$atsfeed = ('php://input') ;
		//apache needs to have permission to write
		file_put_contents($settings['http']['write_location']."/atsfeed.txt", $atsfeed);
	}

	
}

?>